import React from 'react'
import {NavLink,Route,Switch,Redirect} from 'react-router-dom'
import HomeNews from './home-news.jsx'
import HomeMessage from './home-message.jsx'

function Home(){
	return (
		<div className='home-wrapper'>
			<h3 className='display-2'>HOME PAGE</h3>
			<nav className="nav nav-pills nav-fill">
			  <NavLink className="nav-link mr-3" activeClassName="linkactive" to="/home/news">HOME NEWS</NavLink>
			  <NavLink className="nav-link" activeClassName="linkactive" to="/home/message">HOME MESSAGE</NavLink>
			</nav>
			<Switch>
				<Route path='/home/news' component={HomeNews} />
				<Route path='/home/message' component={HomeMessage} />
				<Redirect to='/home/news' />
			</Switch>	
		</div>
	)
}

export default Home